/*
 * @Author: lg
 * @Date: 2024-05-21 09:40:49
 * @LastEditors: zhouxuan
 * @LastEditTime: 2024-09-10 16:57:24
 * @Description:获取登录信息
 * @FilePath: \ssii-user-bk\src\utils\get-token\index.ts
 */

export const getCurrentLoginInfo = (): Record<string, any> => {
  const getLocalStorage: string =
    localStorage.getItem('ssii-common-user-auth') || '{}';

  const getLoginInfo: Record<string, any> = JSON.parse(getLocalStorage);
  // console.log(
  //   getLoginInfo,
  //   'getLoginInfo-------------',
  //   JSON.stringify(getLoginInfo) == '{}'
  // );
  return JSON.stringify(getLoginInfo) != '{}'
    ? getLoginInfo
    : {
        loginInfo: {
          token: 'f35363108e6c40819c9da73cb1cf72d0',
          refreshToken: '240626106899622068224',
          loginId: '240625106629670371328',
          nickname: 'lg',
          mobile: '18824399959',
          headImgUrl: null,
          expirationTime: '2024-06-27 14:09:33'
        }
      };
};
